package com.maple.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.maple.admin.domain.entity.Detail;
import com.maple.admin.service.DetailService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

@Service
public class DetailServiceImpl extends ServiceImpl<BaseMapper<Detail>, Detail> implements DetailService {

    @Override
    public List<Detail> getDetailByPid(Integer pid) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("pid",pid);
        return list(wrapper);
    }

    @Override
    public List<Detail> getDetailByOid(Integer oid) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("oid",oid);
        return list(wrapper);
    }

}
